package com.yh.csx.event.store.gateway.project.dataobject;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @author zhangsheng
 * @date 2021/8/25 19:25
 */
@Entity
@Table(name = "product_config" )
public class ProductConfigDo {
    private Long id;
    private Long teamId;
    private String productName;
    private String productCode;
    private String productManager;
    private String productManagerTel;
    private String productManagerKey;
    private String productTechnologyMan;
    private String productTechnologyManTel;
    private String productTechnologyManKey;
    private Integer delFlag;
    private Integer isFe;
    private Integer isOps;
    private Integer isDb;
    private Integer status;
    private Date createTime;
    private String createBy;
    private Date updateTime;
    private String updateBy;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "team_id", nullable = false)
    public Long getTeamId() {
        return teamId;
    }

    public void setTeamId(Long teamId) {
        this.teamId = teamId;
    }

    @Basic
    @Column(name = "product_name", nullable = false, length = 200)
    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    @Basic
    @Column(name = "product_code", nullable = true, length = 200)
    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    @Basic
    @Column(name = "product_manager", nullable = true, length = 200)
    public String getProductManager() {
        return productManager;
    }

    public void setProductManager(String productManager) {
        this.productManager = productManager;
    }

    @Basic
    @Column(name = "product_manager_tel", nullable = true, length = 100)
    public String getProductManagerTel() {
        return productManagerTel;
    }

    public void setProductManagerTel(String productManagerTel) {
        this.productManagerTel = productManagerTel;
    }

    @Basic
    @Column(name = "product_manager_key", nullable = true, length = 100)
    public String getProductManagerKey() {
        return productManagerKey;
    }

    public void setProductManagerKey(String productManagerKey) {
        this.productManagerKey = productManagerKey;
    }

    @Basic
    @Column(name = "product_technology_man", nullable = true, length = 100)
    public String getProductTechnologyMan() {
        return productTechnologyMan;
    }

    public void setProductTechnologyMan(String productTechnologyMan) {
        this.productTechnologyMan = productTechnologyMan;
    }

    @Basic
    @Column(name = "product_technology_man_tel", nullable = true, length = 100)
    public String getProductTechnologyManTel() {
        return productTechnologyManTel;
    }

    public void setProductTechnologyManTel(String productTechnologyManTel) {
        this.productTechnologyManTel = productTechnologyManTel;
    }

    @Basic
    @Column(name = "product_technology_man_key", nullable = true, length = 100)
    public String getProductTechnologyManKey() {
        return productTechnologyManKey;
    }

    public void setProductTechnologyManKey(String productTechnologyManKey) {
        this.productTechnologyManKey = productTechnologyManKey;
    }

    @Basic
    @Column(name = "del_flag", nullable = true)
    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "is_fe", nullable = true)
    public Integer getIsFe() {
        return isFe;
    }

    public void setIsFe(Integer isFe) {
        this.isFe = isFe;
    }

    @Basic
    @Column(name = "is_ops", nullable = true)
    public Integer getIsOps() {
        return isOps;
    }

    public void setIsOps(Integer isOps) {
        this.isOps = isOps;
    }

    @Basic
    @Column(name = "is_db", nullable = true)
    public Integer getIsDb() {
        return isDb;
    }

    public void setIsDb(Integer isDb) {
        this.isDb = isDb;
    }

    @Basic
    @Column(name = "status", nullable = true)
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "create_time", nullable = true)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "create_by", nullable = true, length = 30)
    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Basic
    @Column(name = "update_time", nullable = false)
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "update_by", nullable = true, length = 30)
    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProductConfigDo that = (ProductConfigDo) o;
        return id == that.id &&
                teamId == that.teamId &&
                Objects.equals(productName, that.productName) &&
                Objects.equals(productCode, that.productCode) &&
                Objects.equals(productManager, that.productManager) &&
                Objects.equals(productManagerTel, that.productManagerTel) &&
                Objects.equals(productManagerKey, that.productManagerKey) &&
                Objects.equals(productTechnologyMan, that.productTechnologyMan) &&
                Objects.equals(productTechnologyManTel, that.productTechnologyManTel) &&
                Objects.equals(productTechnologyManKey, that.productTechnologyManKey) &&
                Objects.equals(delFlag, that.delFlag) &&
                Objects.equals(isFe, that.isFe) &&
                Objects.equals(isOps, that.isOps) &&
                Objects.equals(isDb, that.isDb) &&
                Objects.equals(status, that.status) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(createBy, that.createBy) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(updateBy, that.updateBy);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, teamId, productName, productCode, productManager, productManagerTel, productManagerKey, productTechnologyMan, productTechnologyManTel, productTechnologyManKey, delFlag, isFe, isOps, isDb, status, createTime, createBy, updateTime, updateBy);
    }
}
